
//app.controller('bookCrtl',['$scope','$http',function($scope,$http){
//	$scope.data = [];
//	$http("http://h5.yztctech.net/api/axf/apiyuding.php")
//	.success(function(req){
//		$scope.data = req.product;
//	})
//}])

app.controller('bookCtrl',['$scope','$http',function($scope,$http){
	$scope.list = ['精选水果','直供蔬菜','水产海鲜','肉禽蛋','乳品烘焙','熟食面点','粮油副食','酒水饮料','休闲零食','整箱购'];
	$scope.listData = [];
	$scope.num = 0;
	function request(){
		$http.get("http://h5.yztctech.net/api/axf/apiyuding.php")
		.success(function(req){
		$scope.listData = req.product;
		})
	}
	request()
	$scope.getData = function(text,index){
		$scope.num = index;
		request(text);
	};
}])
